import { NavBar } from 'antd-mobile'
import React, { useEffect, useState } from 'react'
import { useNavigate} from 'react-router-dom'
// import List from '../router/routes'
export default function Navbar(props:any) {
    const navigate = useNavigate()
    return (
        <NavBar
            style={{
                '--height': '46px',
                '--border-bottom': '1px #eee solid',
                backgroundColor:"#fff",
                position:"sticky",
                top:"0",
                zIndex:"999"
                
            }}

            right={props.right}
            onBack={() => { navigate(-1) }}
        >
            {props.title}
        </NavBar>
    )
}
